package foundation.find_integer;

import java.util.Scanner;

/**
 * 给出一个包含n个整数的数列，问整数a在数列中的第一次出现是第几个。
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextInt();
        }
        int find_n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            if (nums[i] == find_n) {
                System.out.println(i + 1);
                return;
            }
        }
        System.out.println(-1);
    }
}
